package com.sasis.model;
// Generated 2007-5-30 11:24:43 by Hibernate Tools 3.1.0.beta4

import java.math.BigDecimal;
import java.sql.Date;
import java.sql.Timestamp;


/**
 * @struts.form include-all="true" extends="BaseForm"
 * @hibernate.class
 *         table="SWITCH_RECORD"
 *     
 */

public class SwitchRecord extends com.sasis.model.BaseObject implements java.io.Serializable {


    // Fields    

    private Integer id;
    private Integer flightInfoId; 
    private Integer passengerInfoId;
    private String switchType;
    private BigDecimal cost;
    private String switchFlightNum;
    private String switchEtNum;
    private String memo;
    private Integer operator;
    private Timestamp operatDate;
//  added by liuhao 2007-8-22
    private String flightNum;
    private Date flightDate;
    private String chineseName;
    private String etNumber;
    private Integer pi_id;
    private String[] pi_ids;
    private String cabinClass;


    // Constructors

    /** default constructor */
    public SwitchRecord() {
    }

	/** minimal constructor */
    public SwitchRecord(Integer flightInfoId, Integer passengerInfoId) {
        this.flightInfoId = flightInfoId;
        this.passengerInfoId = passengerInfoId;
    }
    
    /** full constructor */
    public SwitchRecord(Integer flightInfoId, Integer passengerInfoId, String switchType, BigDecimal cost, String switchFlightNum, String switchEtNum, String memo, Integer operator, Timestamp operatDate) {
        this.flightInfoId = flightInfoId;
        this.passengerInfoId = passengerInfoId;
        this.switchType = switchType;
        this.cost = cost;
        this.switchFlightNum = switchFlightNum;
        this.switchEtNum = switchEtNum;
        this.memo = memo;
        this.operator = operator;
        this.operatDate = operatDate;
    }
    

   
    // Property accessors
    /**       
     *      *            @hibernate.id
     *             generator-class="native"
     *             type="java.lang.Integer"
     *             column="ID"
     *         
     */

    public Integer getId() {
        return this.id;
    }
    
    public void setId(Integer id) {
        this.id = id;
    }
    /**       
     *      *            @hibernate.property
     *             column="FLIGHT_INFO_ID"
     *             length="22"
     *             not-null="true"
     *         
     */

    public Integer getFlightInfoId() {
        return this.flightInfoId;
    }
    
    public void setFlightInfoId(Integer flightInfoId) {
        this.flightInfoId = flightInfoId;
    }
    /**       
     *      *            @hibernate.property
     *             column="PASSENGER_INFO_ID"
     *             length="22"
     *             not-null="true"
     *         
     */

    public Integer getPassengerInfoId(){
        return this.passengerInfoId;
    }
    
    public void setPassengerInfoId(Integer passengerInfoId) {
        this.passengerInfoId = passengerInfoId;
    }
    /**       
     *      *            @hibernate.property
     *             column="SWITCH_TYPE"
     *             length="1"
     *         
     */

    public String getSwitchType() {
        return this.switchType;
    }
    
    public void setSwitchType(String switchType) {
        this.switchType = switchType;
    }
    /**       
     *      *            @hibernate.property
     *             column="COST"
     *             length="10"
     *         
     */

    public BigDecimal getCost() {
        return this.cost;
    }
    
    public void setCost(BigDecimal cost) {
        this.cost = cost;
    }
    /**       
     *      *            @hibernate.property
     *             column="SWITCH_FLIGHT_NUM"
     *             length="8"
     *         
     */

    public String getSwitchFlightNum() {
        return this.switchFlightNum;
    }
    
    public void setSwitchFlightNum(String switchFlightNum) {
        this.switchFlightNum = switchFlightNum;
    }
    /**       
     *      *            @hibernate.property
     *             column="SWITCH_ET_NUM"
     *             length="16"
     *         
     */

    public String getSwitchEtNum() {
        return this.switchEtNum;
    }
    
    public void setSwitchEtNum(String switchEtNum) {
        this.switchEtNum = switchEtNum;
    }
    /**       
     *      *            @hibernate.property
     *             column="MEMO"
     *             length="1024"
     *         
     */

    public String getMemo() {
        return this.memo;
    }
    
    public void setMemo(String memo) {
        this.memo = memo;
    }
    /**       
     *      *            @hibernate.property
     *             column="OPERATOR"
     *             length="22"
     *         
     */

    public Integer getOperator() {
        return this.operator;
    }
    
    public void setOperator(Integer operator) {
        this.operator = operator;
    }
    /**       
     *      *            @hibernate.property
     *             column="OPERAT_DATE"
     *             length="7"
     *         
     */

    public Timestamp getOperatDate() {
        return this.operatDate;
    }
    
    public void setOperatDate(Timestamp operatDate) {
        this.operatDate = operatDate;
    }
    public String getChineseName() {
    	return chineseName;
    }

    public void setChineseName(String chineseName) {
    	this.chineseName = chineseName;
    }

    public Date getFlightDate() {
    	return flightDate;
    }

    public void setFlightDate(Date flightDate) {
    	this.flightDate = flightDate;
    }

    public String getFlightNum() {
    	return flightNum;
    }

    public void setFlightNum(String flightNum) {
    	this.flightNum = flightNum;
    }
    public Integer getPi_id() {
    	return pi_id;
    }
    public void setPi_id(Integer pi_id) {
    	this.pi_id = pi_id;
    }
    public String[] getPi_ids() {
    	return pi_ids;
    }

    public void setPi_ids(String[] pi_ids) {
    	this.pi_ids = pi_ids;
    }
    public String getCabinClass() {
    	return cabinClass;
    }
    public void setCabinClass(String cabinClass) {
    	this.cabinClass = cabinClass;
    }
   

    /**
     * toString
     * @return String
     */
     public String toString() {
	  StringBuffer buffer = new StringBuffer();

      buffer.append(getClass().getName()).append("@").append(Integer.toHexString(hashCode())).append(" [");
      buffer.append("flightInfoId").append("='").append(getFlightInfoId()).append("' ");			
      buffer.append("passengerInfoId").append("='").append(getPassengerInfoId()).append("' ");			
      buffer.append("switchType").append("='").append(getSwitchType()).append("' ");			
      buffer.append("cost").append("='").append(getCost()).append("' ");			
      buffer.append("switchFlightNum").append("='").append(getSwitchFlightNum()).append("' ");			
      buffer.append("switchEtNum").append("='").append(getSwitchEtNum()).append("' ");			
      buffer.append("memo").append("='").append(getMemo()).append("' ");			
      buffer.append("operator").append("='").append(getOperator()).append("' ");			
      buffer.append("operatDate").append("='").append(getOperatDate()).append("' ");			
      buffer.append("]");
      
      return buffer.toString();
     }


   public boolean equals(Object other) {
         if ( (this == other ) ) return true;
		 if ( (other == null ) ) return false;
		 if ( !(other instanceof SwitchRecord) ) return false;
		 SwitchRecord castOther = ( SwitchRecord ) other; 
         
		 return ( (this.getId()==castOther.getId()) || ( this.getId()!=null && castOther.getId()!=null && this.getId().equals(castOther.getId()) ) )
 && ( (this.getFlightInfoId()==castOther.getFlightInfoId()) || ( this.getFlightInfoId()!=null && castOther.getFlightInfoId()!=null && this.getFlightInfoId().equals(castOther.getFlightInfoId()) ) )
 && ( (this.getPassengerInfoId()==castOther.getPassengerInfoId()) || ( this.getPassengerInfoId()!=null && castOther.getPassengerInfoId()!=null && this.getPassengerInfoId().equals(castOther.getPassengerInfoId()) ) )
 && ( (this.getSwitchType()==castOther.getSwitchType()) || ( this.getSwitchType()!=null && castOther.getSwitchType()!=null && this.getSwitchType().equals(castOther.getSwitchType()) ) )
 && ( (this.getCost()==castOther.getCost()) || ( this.getCost()!=null && castOther.getCost()!=null && this.getCost().equals(castOther.getCost()) ) )
 && ( (this.getSwitchFlightNum()==castOther.getSwitchFlightNum()) || ( this.getSwitchFlightNum()!=null && castOther.getSwitchFlightNum()!=null && this.getSwitchFlightNum().equals(castOther.getSwitchFlightNum()) ) )
 && ( (this.getSwitchEtNum()==castOther.getSwitchEtNum()) || ( this.getSwitchEtNum()!=null && castOther.getSwitchEtNum()!=null && this.getSwitchEtNum().equals(castOther.getSwitchEtNum()) ) )
 && ( (this.getMemo()==castOther.getMemo()) || ( this.getMemo()!=null && castOther.getMemo()!=null && this.getMemo().equals(castOther.getMemo()) ) )
 && ( (this.getOperator()==castOther.getOperator()) || ( this.getOperator()!=null && castOther.getOperator()!=null && this.getOperator().equals(castOther.getOperator()) ) )
 && ( (this.getOperatDate()==castOther.getOperatDate()) || ( this.getOperatDate()!=null && castOther.getOperatDate()!=null && this.getOperatDate().equals(castOther.getOperatDate()) ) );
   }
   
   public int hashCode() {
         int result = 17;
         
         result = 37 * result + ( getId() == null ? 0 : this.getId().hashCode() );
         result = 37 * result + ( getFlightInfoId() == null ? 0 : this.getFlightInfoId().hashCode() );
         result = 37 * result + ( getPassengerInfoId() == null ? 0 : this.getPassengerInfoId().hashCode() );
         result = 37 * result + ( getSwitchType() == null ? 0 : this.getSwitchType().hashCode() );
         result = 37 * result + ( getCost() == null ? 0 : this.getCost().hashCode() );
         result = 37 * result + ( getSwitchFlightNum() == null ? 0 : this.getSwitchFlightNum().hashCode() );
         result = 37 * result + ( getSwitchEtNum() == null ? 0 : this.getSwitchEtNum().hashCode() );
         result = 37 * result + ( getMemo() == null ? 0 : this.getMemo().hashCode() );
         result = 37 * result + ( getOperator() == null ? 0 : this.getOperator().hashCode() );
         result = 37 * result + ( getOperatDate() == null ? 0 : this.getOperatDate().hashCode() );
         return result;
   }



public String getEtNumber() {
	return etNumber;
}

public void setEtNumber(String etNumber) {
	this.etNumber = etNumber;
}

 





}
